pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let fb = Fibonacci { a: 0, b: 1, acc: 0 };
    aux(fb, threshold).acc
}

fn aux(fb: Fibonacci, thres: u32) -> Fibonacci {
    let Fibonacci { a, b, mut acc } = fb;
    if b >= thres {
        return fb;
    }
    if b % 2 == 1 {
        acc += b;
    }
    aux(
        Fibonacci {
            a: b,
            b: a + b,
            acc,
        },
        thres,
    )
}
struct Fibonacci {
    a: u32,
    b: u32,
    acc: u32,
}
